﻿package Interface.ShopClasses
{	
	import Interface.SelectableLabel;
	import Fonts.FranclinGothicDemi;

	import flash.text.TextField;	
	import flash.text.TextFormat;
	import flash.display.Sprite;
	import flash.filters.GlowFilter;
	
	public class CategoryLabel extends SelectableLabel
	{
		private var FCover:Sprite;
		private var FID:int;
		
		public function CategoryLabel(AText:String):void
		{		
			var vFont:FranclinGothicDemi = new FranclinGothicDemi();
			var vFormat:TextFormat = new TextFormat(vFont.fontName);
			vFormat.size = 17;			
			vFormat.align = 'center';
			
			FText = new TextField();						
			FText.embedFonts = true;
			FText.defaultTextFormat = vFormat;			
			FText.selectable = false;			
			FText.text = AText;
			FText.height = FText.textHeight;
			FText.width = FText.textWidth + 10;			
			FText.textColor = 0xFFFFFF;
			addChild(FText);
			
			FCover = new Sprite();
			FCover.graphics.beginFill(0x000000, 0);
			FCover.graphics.drawRect(0, 0, width, height);
			FCover.graphics.endFill();
			FCover.buttonMode = true;
			FCover.useHandCursor = true;
			addChild(FCover);
			
			var VFilter:GlowFilter = new GlowFilter(0x393F79, 1, 7, 7, 10, 1);
			FText.filters = [VFilter];
			
			super();			
			FSelectdColor = 0x3EFF67;
		}
		
		public function get ID():int
		{
			return FID;
		}
		
		public function set ID(AID:int)
		{
			FID = AID;
		}
	}	
}
